[XEN] Forcibly undefine swap{16,32,64} in mkelf32 program.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 19 Oct 2006 13:38:34 +0000 (14:38 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 19 Oct 2006 13:38:34 +0000 (14:38 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/boot/mkelf32.c

index 53cc5142954e06a5902767b0b5bc8d1b5a740c27..18e52b58360059bb2968610e45f452868946b714 100644 (file)
@@ -90,6 +90,11 @@ static Elf32_Shdr out_shdr[] = {
     }
 };
 
+/* Some system header files define these macros and pollute our namespace. */
+#undef swap16
+#undef swap32
+#undef swap64
+
 #define swap16(_v) ((((u16)(_v)>>8)&0xff)|(((u16)(_v)&0xff)<<8))
 #define swap32(_v) (((u32)swap16((u16)(_v))<<16)|(u32)swap16((u32)((_v)>>16)))
 #define swap64(_v) (((u64)swap32((u32)(_v))<<32)|(u64)swap32((u32)((_v)>>32)))